package com.xwintop.xTransfer.sender.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.*;

/**
 * @ClassName: SenderConfigPulsar
 * @Description: Pulsar发送器配置
 * @author: xufeng
 * @date: 2021/12/12 13:00
 */

@Getter
@Setter
@ToString
public class SenderConfigPulsar implements SenderConfig {
    private String serviceName = "senderPulsar";//对应服务名称
    private String id;//如果留空则系统自动分配
    private boolean enable = true;//是否开启
    private boolean async = false;//是否异步执行
    /** 是否发生异常时退出任务 */
    private boolean exceptionExit = true;
    private String fileNameFilterRegex;//文件名过滤正则表达式

    private String serviceUrl = "pulsar://localhost:6650";
    private Integer ioThreads = 10;
    private Integer listenerThreads = 10;
    private boolean enableTcpNoDelay = false;
    private Integer keepAliveIntervalSec = 20;
    private Integer connectionTimeoutSec = 10;
    private Integer operationTimeoutSec = 15;
    private long startingBackoffIntervalMs = 100;
    private long maxBackoffIntervalSec = 10;
    private String consumerNameDelimiter = "";
    private String namespace = "default";
    private String tenant = "public";
    private String tlsTrustCertsFilePath = null;
    private List<String> tlsCiphers = new ArrayList<>();
    private List<String> tlsProtocols = new ArrayList<>();
    private String tlsTrustStorePassword = null;
    private String tlsTrustStorePath = null;
    private String tlsTrustStoreType = null;
    private boolean useKeyStoreTls = false;
    private boolean allowTlsInsecureConnection = false;
    private boolean enableTlsHostnameVerification = false;
    private String tlsAuthCertFilePath = null;
    private String tlsAuthKeyFilePath = null;
    private String tokenAuthValue = null;

    private String topic;

    private String fileNameField = "X_TRANSFER_FILE_NAME";//文件名获取字段
    private Map args = new HashMap();//扩展参数
}
